﻿using System;

namespace PaceR.Core.Interfaces.Conditionals
{
    public interface IConditionRule : IConditionalOperation
    {
        IConditionTestable Test { get; set; }

        IConditionalOperation SuccessOperation { get; set; }
        IConditionalOperation FailureOperation { get; set; }

        // Methods return IConditionRule for Fluent Interface
        IConditionRule ElseIf(IConditionTestable test, IConditionalOperation thenOperation);
        IConditionRule ElseIf<T, TResult>(IConditionTestable test, Func<T, TResult> thenOperation, T argument);
        IConditionRule ElseIf<T>(IConditionTestable test, Action<T> thenOperation, T argument);

        IConditionRule Else(IConditionalOperation elseOperation);
        IConditionRule Else<T, TResult>(Func<T, TResult> elseOperation, T argument);
        IConditionRule Else<T>(Action<T> elseOperation, T argument);
    }
}
